<%@ include file="/common/taglibs.jsp"%>

<title><fmt:message key="englishDetail.title"/></title>
<content tag="heading"><fmt:message key="englishDetail.heading"/></content>

<html:form action="saveEnglish" method="post" styleId="englishForm" onsubmit="return validateEnglishForm(this)">
<ul>

<html:hidden property="id"/>

    <li>
        <EnglishRepository:label styleClass="desc" key="englishForm.typeId"/>
            <html:select property="typeId">
            	<html:options collection="types" property="typeId" labelProperty="typeName"/>
            </html:select>
        <!-- html:text property="typeId" styleId="typeId" styleClass="text medium"/-->

    </li>

    <li>
        <EnglishRepository:label styleClass="desc" key="englishForm.no"/>
        <html:errors property="no"/>
        <html:text property="no" styleId="no" styleClass="text medium"/>

    </li>

    <li>
        <EnglishRepository:label styleClass="desc" key="englishForm.question"/>
        <html:errors property="question"/>
		<html:textarea property="question"  cols="60" rows="5" readonly="false"></html:textarea>
    </li>

    <li>
        <EnglishRepository:label styleClass="desc" key="englishForm.answers"/>
        <html:errors property="answers"/>
        <html:text property="answers" styleId="answers" styleClass="text medium"/>

    </li>

    <li>
        <EnglishRepository:label styleClass="desc" key="englishForm.description"/>
        <html:errors property="description"/>
		<html:textarea property="description" cols="60" rows="5" readonly="false"></html:textarea>
    </li>

    <li>
        <EnglishRepository:label styleClass="desc" key="englishForm.year"/>
        <html:errors property="year"/>
        <html:text property="year" styleId="year" styleClass="text medium"/>

    </li>

    <li class="buttonBar bottom">
        <html:submit styleClass="button" property="method.save" onclick="bCancel=false">
            <fmt:message key="button.save"/>
        </html:submit>

        <html:submit styleClass="button" property="method.delete" onclick="bCancel=true; return confirmDelete('English')">
            <fmt:message key="button.delete"/>
        </html:submit>

        <html:cancel styleClass="button" onclick="bCancel=true">
            <fmt:message key="button.cancel"/>
        </html:cancel>
    </li>
</ul>
</html:form>

<script type="text/javascript">
    Form.focusFirstElement($("englishForm"));
</script>

<html:javascript formName="englishForm" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<html:rewrite page="/scripts/validator.jsp"/>"></script>
